package com.itheima.dao;

import com.github.pagehelper.Page;
import com.itheima.entity.OrderResult;
import com.itheima.pojo.Order;
import com.itheima.pojo.OrderSetmeal;
import org.apache.ibatis.annotations.Param;
import com.itheima.pojo.Report;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

public interface OrderDao {
    public void add(Order order);
    public List<Order> findByCondition(Order order);
    public Map findById4Detail(Integer id);
    public Integer findOrderCountByDate(String date);
    public Integer findOrderCountAfterDate(String date);
    public Integer findVisitsCountByDate(String date);
    public Integer findVisitsCountAfterDate(String date);
    public List<Map> findHotSetmeal();

    Order getOrder(@Param("orderId") Integer orderId);

    void updateState(@Param("orderId") Integer orderId);

    String findStateById(@Param("id") Integer id);

    //预约列表分页查询
    List<Order> findListByCondition(Map<String, Object> map);
    //预约列表编辑数据回显
    Order findByOrderId(int id);
    //预约修改
    void editByOrderId(Order order);
    //更改预约状态
    void changeStatus(Order order);
    //删除预约信息
    void deleteByorderId(int id);
    //删除预约关联关系
    Map<String, Object> findOrderAndSetmeal(OrderSetmeal orderSetmeal);
    //根据id查询订单
    Order findOrderById(Integer orderId);
    //查询指定日期
    List<String> findDate(@Param("startTime")String startTime , @Param("endTime")String endTime);
    //新增预约
    void addorderList(Order order);



    public Order findByMemberId4Detail(Integer id);
    public Map findById(Integer id);
    public Page<OrderResult> selectByCondition(String queryString);
    public List<Order> findByMemberId(Integer id);

    public Order findByOrderIdWGL(Integer id);
}
